Ok. I found how to do it.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim MySubMenu As New System.Windows.Forms.ToolStripMenuItem("Sub")
AddHandler MySubMenu.Click, AddressOf Subsub1ToolStripMenuItem_Click
Me.Sub1ToolStripMenuItem.DropDownItems.AddRange(Ne w
System.Windows.Forms.ToolStripItem() {MySubMenu})
End Sub
Private Sub Subsub1ToolStripMenuItem_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs)
MsgBox("asdf")
End Sub
Ï "Pitaridis Aristotelis" <pi*******@hotmail.comÝãñáøå óôï ìÞíõìá
news:1159186318.599386@athprx04...
>
I have the following structure for the MenuStrip of a form.
Main1
- SubMenu1
- SubMenu2
Main2
I want dynamicaly to add some option in the SubMenu2 in order to have the
following structure:
Main1
- SubMenu1
- SubMenu2
- SubSubMenu1
- SubSubMenu2
- SubSubMenu3
- SubSubMenu4
Main2